package com.saumya.utils 
{
	/**
	 * @usage Used for some array functionality
	 * @version 0.1
	 * @author saumya
	 */
	public class ArrayUtil
	{
		public function ArrayUtil() 
		{
			//empty constructor
		}
		/**
		 * 
		 * @param	totalItems
		 * @param	setOf
		 * @return  array containing set arrays
		 */
		public function makeSet(totalItems:int,setOf:int):Array
		{
			var totalSet:uint=Math.ceil(totalItems/setOf);
			var a:Array=[];
			var j:uint=0;
			for(var i:uint=0;i<totalItems;i++)
			{
				if((i%setOf)==0)
				{
					j++;
					var ar:Array=[];
					a.push(ar);
				}
					var b:Array=a[j-1];
					b.push(i);
			}
			return a;
		}
		
	}

}